<% unless @categories.blank? %>
  <h3>categorías</h3>

  <% unless @categories.blank? %>
    <ul>
    <% @categories.each do |category| %>
      <li><%= link_to_unless_current category.name, category_user_path(category, @user) %> 
      <span class="counter">(<%= Category.count(:joins => :recipes, 
          :conditions => { :id => category.id,
          :recipes => { :author_id => @user.id }
        }) %>)</span></li>
    <% end %>
    <li><%= link_to_unless_current "todas", @user %> <span class="counter">(<%= @total_recipes %>)</span></li>
    </ul>
  <% end %>
<% end %>
